{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "from math import *\n",
    "import numpy as np"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 멤리스터"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 355,
   "metadata": {},
   "outputs": [],
   "source": [
    "class Memristor:\n",
    "    def __init__(self, name):\n",
    "        self.name = name\n",
    "        self.x = 0.1\n",
    "        self.xp = 0.1\n",
    "        self.xn = 0.2\n",
    "        self.vp = 1.5\n",
    "        self.vn = 0.7\n",
    "        self.alphap = 6\n",
    "        self.alphan = 4\n",
    "        self.a1 = 4e-4\n",
    "        self.a2 = 3e-4\n",
    "        self.ap = 0.032\n",
    "        self.an = 0.001\n",
    "        self.b = 1.0\n",
    "        \n",
    "        self.gf = 0.0\n",
    "        \n",
    "        self.interval = 0.1\n",
    "    \n",
    "    def change_x(self, V):\n",
    "        if V >= 0:\n",
    "            if self.x >= self.xp:\n",
    "                self.f = exp(-self.alphap*(self.x - self.xp)) * (((self.xp - self.x)/(1 - self.xp)) + 1)\n",
    "            else:\n",
    "                self.f = 1.0\n",
    "        elif V < 0:\n",
    "            if self.x <= (1 - self.xn):\n",
    "                self.f = exp(self.alphan*(self.x + self.xn - 1.0)) * (self.x/(1-self.xn))\n",
    "            else:\n",
    "                self.f = 1.0\n",
    "            \n",
    "        if V > self.vp:\n",
    "            self.g = self.ap * (exp(V)-exp(self.vp))\n",
    "        elif V < -self.vn:\n",
    "            self.g = -self.an * (exp(-V)-exp(self.vn))\n",
    "        else:\n",
    "            self.g = 0\n",
    "            \n",
    "        self.gf = self.f * self.g\n",
    "        self.x += self.gf * self.interval\n",
    "    \n",
    "    def activate(self, V):\n",
    "        self.change_x(V)\n",
    "        \n",
    "        if V >= 0:\n",
    "            curr = self.a1 * self.x * sinh(self.b * V)\n",
    "        else:\n",
    "            curr = self.a2 * self.x * sinh(self.b * V)\n",
    "        \n",
    "        return curr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 360,
   "metadata": {},
   "outputs": [],
   "source": [
    "mem_1 = Memristor('mem_1')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 361,
   "metadata": {},
   "outputs": [],
   "source": [
    "base_time = np.arange(0, 2*pi, mem_1.interval)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 362,
   "metadata": {},
   "outputs": [],
   "source": [
    "input_volt = []\n",
    "for t in base_time:\n",
    "    input_volt.append(-2.5 * sin(t))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 363,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x7effe23eb630>"
      ]
     },
     "execution_count": 363,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXYAAAD8CAYAAABjAo9vAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAE31JREFUeJzt3W+MXNV5x/Hf4/UEFtOyqlghWOPYUiNHaUjiMEKNtkobkmBaaKCQSInUSE0rWZWSKlUrIrt9AX1RsZKlqJFSVbWANqg0KIqNZRVah8ioaVBJ2cVUxhgiSoLwJhWOyKYBb+Rd++mLHcPu7J1/e+/Mueec70ey8A7DzBksfpz7PM+5Y+4uAEA6NoVeAACgWgQ7ACSGYAeAxBDsAJAYgh0AEkOwA0BiCHYASAzBDgCJIdgBIDGbQ7zplVde6du3bw/x1gAQrbm5uZ+4+2Sv5wUJ9u3bt2t2djbEWwNAtMzslX6eRykGABJDsANAYgh2AEgMwQ4AiSHYASAxBDsAJCbIuCOAOB0+Pq/9R1/UjxYWdc3EuO7avVOS+nrs9l1TIZeeFQvx1XjNZtOZYwficvj4vPYdO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8PMGpK+K+mL7v5U4KUNzMz+TFJT0i+7+62h1zMoM/uhpKa7RzvHbmZfk/Qf7n6fmb1D0mXuvhByTTHt2G+Q9JK7v+zu5yQ9LOm2wGsaiLt/R9LroddRhrv/2N2faf3+55JOSYrqGzp8xRutHxutX3HscFYxs62SbpF0X+i15MrMrpD0YUn3S5K7nwsd6lJcwT4l6dVVP59WZIGSGjPbLmmXpO+FXcngWiWMZyW9Julxd4/uM0j6G0lfknQh9EJKcEnfMrM5M9sTejEbsEPSGUn/0CqJ3WdmW0IvKqZgR42Y2eWSDkr6U3f/v9DrGZS7n3f3D0jaKukGM4uqNGZmt0p6zd3nQq+lpN9w9w9K+m1Jn2+VK2OyWdIHJf2du++S9Kak4P2/mIJ9XtK1q37e2noMI9aqSx+U9JC7Hwq9njJal81PSLo59FoGNC3pE60a9cOSbjSzfwq7pMG5+3zrr69JekQrJdeYnJZ0etUV3ze1EvRBxRTsT0t6l5ntaDUoPi3pSOA1ZafVeLxf0il3/3Lo9WyEmU2a2UTr9+Naaci/EHZVg3H3fe6+1d23a+W/hWPu/vuBlzUQM9vSasCrVb64SVJUE2Pu/r+SXjWzna2HPiop+CDB5tAL6Je7L5vZFyQdlTQm6QF3Pxl4WQMxs69L+i1JV5rZaUl3u/v9YVc1sGlJn5V0olWjlqS/cPfHAq5pUFdL+lpr0mqTpG+4e5TjgpG7StIjK3sFbZb0z+7+b2GXtCF/Iumh1obzZUmfC7yeeMYdAQD9iakUAwDoA8EOAIkh2AEgMQQ7ACSGYAeAxBDsAJAYgh0AEkOwA0Bi/h+JSmKujMyEBwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7effe247e6d8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(base_time, input_volt)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 364,
   "metadata": {},
   "outputs": [],
   "source": [
    "output = []\n",
    "for V in input_volt:\n",
    "    curr = mem_1.activate(V)\n",
    "    output.append(curr)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 365,
   "metadata": {},
   "outputs": [],
   "source": [
    "output = np.array(output)\n",
    "output = output * 1e+6"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 366,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x7effe23c4dd8>"
      ]
     },
     "execution_count": 366,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAD8CAYAAAB6paOMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAF2tJREFUeJzt3X+MZeV52PHvw7CmQxNlsFkRmF13kbKihRKz1ogSUVUtOAHc2GyQf+BUMU2RVlWx6sgWySJHxfmnbIRqajeOq42xglUnBCX2sg20mLBIVqNie8hiYNlST0kcdozNxAGS1huXXT/9Y87Qy3Dv3F/n3nPOPd+PtNpz3nNm7nv5cZ5znvd9nxOZiSSpvc6ougOSpGoZCCSp5QwEktRyBgJJajkDgSS1nIFAklrOQCBJLWcgkKSWMxBIUsudWXUHBnHuuefmrl27qu6GJDXK448//heZub3feY0IBLt27WJ5ebnqbkhSo0TEtwY5z9SQJLWcgUCSWs5AIEktZyCQpJYzEEhSyzVi1pAktcGho6vc+dCzfPvlk1ywMM+t11zE3j2LE/9cA4Ek1cCho6vc9sWnOPnqaQBWXz7JbV98CmDiwcDUkCTVwJ0PPftaENhw8tXTfPS+b3Do6OpEP9snAkmqSGcqqNfb409nTvzJwCcCSarARipodYsgsOHkq6e586FnJ9aXUgJBRPxZRDwVEU9ExHLR9uaIeDgivln8fU7RHhHxqYhYiYgnI+LtZfRBkpqkWypoK99++eTE+lLmE8E/yczLMn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C/AP5Lsb0IPN9x7ETR1qv9DSJiX0QsR8Ty2tpaid2UJHXq+0QQEX8E/HiXQx/LzPuLcz4GnAK+UFbHMvMgcBBgaWlpkPfFSJJG0DcQZOY7tjoeEf8c+Fng6szXqrmtAjs7TttRtLFFuySpAuPOGroW+GXg3Zn5/Y5Dh4EbI+KsiLgQ2A18Dfg6sDsiLoyIN7E+oHx4nD5IksYz7jqC3wDOAh6OCIDHMvNfZuaxiLiP9UHgU8AtmXkaICI+BDwEzAGfy8xjY/ZBkjSGyD61+esgItaAb1XdjxGcC/xF1Z2YMr/z7Gvb94Xmfue/k5nb+53UiEDQVBGxnJlLVfdjmvzOs69t3xdm/zvPbNE5SdJgDASS1HIGgsk6WHUHKuB3nn1t+74w49/ZMQJJajmfCCSp5QwEE7ZVqe5ZFRHvjYhjEfHDiJjZmRbTKqleFxHxuYh4MSKerrov0xIROyPi0Yh4pvhv+sNV92kSDAST17VU94x7GrgB+ErVHZmUaZZUr5HfZr2sfJucAj6amRcDVwC3zOK/ZwPBhGXmlzPzVLH7GOv1lWZaZh7PzP4vjW62yylKqmfm/wU2SqrPrMz8CvCXVfdjmjLzhcz8k2L7r4Hj9KiY3GQGgunqLNWtZhu4pLpmQ0TsAvYAX622J+Wb2XcWT1NVpbqrNMh3lmZFRPwI8AfAL2XmX1Xdn7IZCEowYqnuRuv3nVtgq1LrmiERsY31IPCFzPxi1f2ZBFNDE7ZFqW41myXVWyDWyyrfDRzPzE9U3Z9JMRBM3m8AP8p6qe4nIuI/Vt2hSYuIn4uIE8BPAQ9ExENV96lsxQSAjZLqx4H7Zr2kekT8LvDfgYsi4kRE3Fx1n6bgSuAXgKuK/3+fiIh3Vt2psrmyWJJazicCSWo5A4EktZyBQJJazkAgSS1nIJCkljMQSFLLGQgkqeUMBJLUcv8Pccq4PIisXIMAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7effe2458898>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(input_volt, output)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 367,
   "metadata": {},
   "outputs": [],
   "source": [
    "mem_2 = Memristor(\"mem_2\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 368,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x7effe232c0b8>"
      ]
     },
     "execution_count": 368,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAElRJREFUeJzt3XGMHGd9xvHnyfkCR6GcWl9FfbZxVBlTi6AaVgmV/yg4QXHSKjZBkLhqK1qEVZVUVCBXtkBplVZK2khUrUhLrRJRKCVKSepaipGhTapIFkY+1zTBDkYnU/BdkHLQOK2Uo7HDr3/sHkyO3duZ3Zmd3Xe/H8nK7ezvnXk3iR+P33nfdx0RAgCk5aq6OwAAKB/hDgAJItwBIEGEOwAkiHAHgAQR7gCQIMIdABJEuANAggh3AEjQurouvH79+tiyZUtdlweAkXT69OnvRcRMt7rawn3Lli2am5ur6/IAMJJsfztPHcMyAJAgwh0AEkS4A0CCCHcASBDhDgAJItwBIEGEOwAkqGu4237A9rO2v97hfdv+K9vztp+0/ZbyuwkAKCLPIqZPS/qEpM90eP9mSVtbv66X9DetfwIj5ciZRd13/LyeubSsDdNTOnDTNu3dMVu4pp/zD1PbXtoVbVN1/TjrGu4R8YTtLWuU7JH0mWh+0/ZJ29O2fz4ivltSH4HKHTmzqEOPPKXlyy9JkhYvLevQI09J0o/CI09NP+cfpra9tCvapur6cVfGmPuspIuZ1wutY8DIuO/4+R+Fxorlyy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emB7t6Q/lHRrRLxQd39QmlOSttq+xvbVan7R+9Ga+4QS2bakT0l6OiI+Xnd/qkS49+YTkl4j6cu2v2b7k3V3qGq232V7QdIvS3rU9vG6+1S21kPyOyUdV/NB20MRcbbeXlXL9uclfUXSNtsLtt9fd58qtlPSb0ra1fq9+zXbt9TdqSqwQhUAEsSdOwAkiHAHgAQR7gCQIMIdABJEuANAggh3AEgQ4Q4ACSLcASBB/w9VJoQjdjn+PgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7effe23a80f0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "output_2 = []\n",
    "for V in input_volt:\n",
    "    mem_2.activate(V)\n",
    "    output_2.append(mem_2.f)\n",
    "    \n",
    "output_2 = np.array(output_2)\n",
    "plt.scatter(input_volt, output_2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 369,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1.        , 0.00760126, 0.00760126, 0.00760126, 0.00760125,\n",
       "       0.0076012 , 0.00760109, 0.00760093, 0.00760068, 0.00760036])"
      ]
     },
     "execution_count": 369,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "output_2[:10]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
